﻿using Architecture.Repository.Interface.Traceability;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Traceability.Domain.BreedDomain;

namespace Architecture.Repository.Impl.Traceability
{
    public class BreedRepository : BaseRepository<Breed>, IBreedRepository
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="context"></param>
        public BreedRepository(EFCoreContext context) : base(context)
        {

        }

        /// <summary>
        /// 添加养殖信息
        /// </summary>
        /// <param name="breed">养殖实体</param>
        /// <returns>返回受影响的行数</returns>
        public async Task<int> AddBreed(Breed breed)
        {
            return await base.AddAsync(breed);
        }


        /// <summary>
        /// 查询养殖信息
        /// </summary>
        /// <returns>返回养殖信息列表</returns>
        public async Task<List<Breed>> GetBreed()
        {
            return await base.GetAllAsync();
        }

    }
}
